Optimal. Leaf size=173 \[ -\frac {a^2 (2 m+3) \sin (c+d x) \cos ^{m+1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )}{d (m+1) (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {2 a^2 \sin (c+d x) \cos ^{m+2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(c+d x)\right )}{d (m+2) \sqrt {\sin ^2(c+d x)}}+\frac {a^2 \sin (c+d x) \cos ^{m+1}(c+d x)}{d (m+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2763, 2748, 2643} \[ -\frac {a^2 (2 m+3) \sin (c+d x) \cos ^{m+1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )}{d (m+1) (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {2 a^2 \sin (c+d x) \cos ^{m+2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(c+d x)\right )}{d (m+2) \sqrt {\sin ^2(c+d x)}}+\frac {a^2 \sin (c+d x) \cos ^{m+1}(c+d x)}{d (m+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 2748
Rule 2763
Rubi steps
\begin {align*} \int \cos ^m(c+d x) (a+a \cos (c+d x))^2 \, dx &=\frac {a^2 \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m)}+\frac {\int \cos ^m(c+d x) \left (a^2 (3+2 m)+2 a^2 (2+m) \cos (c+d x)\right ) \, dx}{2+m}\\ &=\frac {a^2 \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m)}+\left (2 a^2\right ) \int \cos ^{1+m}(c+d x) \, dx+\frac {\left (a^2 (3+2 m)\right ) \int \cos ^m(c+d x) \, dx}{2+m}\\ &=\frac {a^2 \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m)}-\frac {a^2 (3+2 m) \cos ^{1+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) (2+m) \sqrt {\sin ^2(c+d x)}}-\frac {2 a^2 \cos ^{2+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 0.53, size = 0, normalized size = 0.00 \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^2 \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.76, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \cos \left (d x + c\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.57, size = 0, normalized size = 0.00 \[ \int \left (\cos ^{m}\left (d x +c \right )\right ) \left (a +a \cos \left (d x +c \right )\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\cos \left (c+d\,x\right )}^m\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \cos {\left (c + d x \right )} \cos ^{m}{\left (c + d x \right )}\, dx + \int \cos ^{2}{\left (c + d x \right )} \cos ^{m}{\left (c + d x \right )}\, dx + \int \cos ^{m}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________